﻿using System;
using DapperExtensions.Mapper;
using Newtonsoft.Json;

namespace ZilLion.Service.WeChatMall.Domain.Entitys
{
    public class CustEntity
    {
        [JsonProperty("custid")]
        public long CustId { get; set; }

        [JsonProperty("custappid")]
        public string AppId { get; set; }

        [JsonProperty("custopenid")]
        public string OpenId { get; set; }

        [JsonProperty("addedtime")]

        public DateTime Addedtime { get; set; }
    }


    public class CustEntityMapper : ClassMapper<CustEntity>
    {
        public CustEntityMapper()
        {
            Table("weisccustomer");
            Map(f => f.CustId).Column("custid").Key(KeyType.Assigned);
            Map(f => f.AppId).Column("appid");
            Map(f => f.OpenId).Column("openid");
            Map(f => f.Addedtime).Column("addedtime");
        }
    }
}